﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0 user-scalable=yes">
    <link href="css/jquery.mobile-1.2.0.min.css" rel="stylesheet" type="text/css" />
    <link href="css/common.css" rel="stylesheet" />
    <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="js/jquery.mobile-1.2.0.min.js" type="text/javascript"></script>
    <script src="js/config.js"></script>
    <script src="js/phonegap.js"></script>
</head>
<body>

    <div data-role="dialog">

        <div data-role="header" data-theme="d">
            <h1>登录</h1>

        </div>

        <div data-role="content" data-theme="c">
            <h1>登陆</h1>
            <!--<p>快快和朋友一起分享吧！</p>-->
            <a name="login" val="sina" href="#" data-role="button" data-rel="" data-theme="b">新浪账号登陆</a>
            <a name="login" val="ten" href="#" data-role="button" data-rel="" data-theme="b">腾讯账号登陆</a>
            <a name="login" val="kaixin" href="#" data-role="button" data-rel="" data-theme="b">开心账号登陆</a>
            <a name="login" val="renren" href="#" data-role="button" data-rel="" data-theme="b">人人账号登陆</a>
            <a name="login" val="baidu" href="#" data-role="button" data-rel="" data-theme="b">百度账号登陆</a>
            <a name="login" val="taobao" href="#" data-role="button" data-rel="" data-theme="b">淘宝账号登陆</a>
            <a name="login" val="tenweibo" href="#" data-role="button" data-rel="" data-theme="b">腾讯微博账号登陆</a>
            <a id="btnBack" href="#" data-role="button" data-rel="button" data-theme="c">Cancel</a>
        </div>
        <script type="text/javascript">
            var isback = location.href.toLowerCase().indexOf("detail.html") == -1;
            $(function () {
            	isFirst = false;
                $("a[name='login']").each(function() {
                    var val = $(this).attr("val");
                    var url = apihost + "/auth/login?t=" + val + "&display=mobile";
                    //$(this).attr("href", apihost + "/auth/login?t=" + val + "&display=wap&mmjcallback=" + encodeURI(loginCallBack));
                    $(this).click(function() {
                        location.href=url;
                    });
                });
                $("#btnBack").click(function() {
                    //if (isback) {
                    //    history.go(-2);
                    //} else {
                    //    history.go(-1);
                    //}
                    location.href="?goback=1";
                });
            });
            
            $(document).live('pagecreate', function (event) {
                if ($("a[title='Close']").length == 1) {
                    $("a[title='Close']").hide();
                }
            });
            
            $(document).live('pageremove', function (event) {
                if (isback) history.go(-1);
            });

        </script>
    </div>


</body>
</html>
